package com.alibaba.bos.service.base.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.alibaba.bos.dao.base.StandardRepository;
import com.alibaba.bos.domain.base.Standard;
import com.alibaba.bos.service.base.StandardService;

@Service
@Transactional
public class StandardServiceImpl implements StandardService {

    @Autowired
    private StandardRepository standardRepository;

    //添加取派标准
    @Override
    public void save(Standard standard) {
        standardRepository.save(standard);
    }
    
    //查询当前页面的数据
    @Override
    public Page<Standard> findPageData(Pageable pageable) {
        return  standardRepository.findAll(pageable);
         
    }
    
    //查询所有的取派标准
    @Override
    public List<Standard> findAll() {
        return standardRepository.findAll();
    }
}
